package com.aaa.controller;


import com.aaa.entity.UMS_Admin;
import com.aaa.service.UMS_Adminservice;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("ums_admin")
public class UMS_AdminrController {

    @Resource
    UMS_Adminservice ums_adminservice;

    @RequestMapping("list")
    public List<UMS_Admin> list() {
        List<UMS_Admin> list = ums_adminservice.list();
        return list;
    }

    @RequestMapping("LoginTime")
    public Integer LoginTime(String username) {
        return ums_adminservice.LoginTime(username);
    }

    @RequestMapping("updAll")
    public Integer updAll(String username, String email, String nickName, String note, Integer id) {
        return ums_adminservice.updAll(username, email, nickName, note, id);
    }

    @RequestMapping("del")
    public Integer del(Integer ids) {
        return ums_adminservice.del(ids);
    }

    @RequestMapping("selectAll")
    public List<UMS_Admin> selectAll(Integer id, String createTime) {
        return ums_adminservice.selectAll(id, createTime);
    }

}
